// Standard Template Library example

#include <iostream>
#include <list>
using namespace std;

// Simple example uses type int

main()
{
   list<int> L;
   L.push_back(0);              // Insert a new element at the end
   L.push_front(0);             // Insert a new element at the beginning
   L.insert(++L.begin(),2);     // Insert "2" before position of first argument
                                // (Place before second argument)
   L.push_back(5);
   L.push_back(6);
   L.sort();
   L.reverse();

   list<int>::iterator i;

   for(i=L.begin(); i != L.end(); ++i) cout << *i << " ";
   cout << endl;
   return 0;
}


/*                
Member functions
	(constructor)	 Construct list (public member function)
	(destructor)	 List destructor (public member function)
	operator=	 Copy container content (public member function )

Iterators:
	begin	 Return iterator to beginning (public member function)
	end	 Return iterator to end (public member function )
	rbegin	 Return reverse iterator to reverse beginning (public member function)
	rend	 Return reverse iterator to reverse end (public member function)

Capacity:
	empty	 Test whether container is empty (public member function)
	size	 Return size (public member function)
	max_size	 Return maximum size (public member function)
	resize	 Change size (public member function)

Element access:
	front	 Access first element (public member function )
	back	 Access last element (public member function)

Modifiers:
	assign	 Assign new content to container (public member function)
	push_front	 Insert element at beginning (public member function)
	pop_front	 Delete first element (public member function)
	push_back	 Add element at the end (public member function)
	pop_back	 Delete last element (public member function)
	insert	 Insert elements (public member function)
	erase	 Erase elements (public member function)
	swap	 Swap content (public member function )
	clear	 Clear content (public member function)

Operations:
	splice	 Move elements from list to list (public member function)
	remove	 Remove elements with specific value (public member function)
	remove_if	 Remove elements fulfilling condition (public member function template)
	unique	 Remove duplicate values (member function)
	merge	 Merge sorted lists (public member function)
	sort	 Sort elements in container (public member function)
	reverse	 Reverse the order of elements (public member function)

Allocator:
	get_allocator	 Get allocator (public member function )
*/
